home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / doc / install next >
Text File  |  1989-06-27  |  14KB  |  495 lines

  1. .de Fn
  2. \\&\\$1\\fB\\$2\\fP\\$3
  3. ..
  4. .TL
  5. Installing ``C News'' Network News Software
  6. .AU
  7. Geoff Collyer
  8. .AI
  9. Department of Statistics
  10. University of Toronto
  11. .AB
  12. This document describes the flow
  13. of network news within and between machines,
  14. what each component of C news does,
  15. and
  16. how to install C news.
  17. .AE
  18. .SH
  19. Introduction
  20. .PP
  21. Network news
  22. (or
  23. .I netnews
  24. for short)
  25. consists of a collection of messages formatted similarly to
  26. ARPAnet mail
  27. (see ARPA Internet RFC 1036 for details),
  28. widely spread.
  29. The logical network,
  30. imposed on top of various real networks,
  31. formed by the set of all interconnected sites
  32. exchanging network news is called ``Usenet''
  33. and was formed in 1979,
  34. radiating out from Duke University.
  35. Netnews is propagated
  36. between cooperating machines
  37. by a flooding algorithm,
  38. with some loop prevention heuristics:
  39. each machine sends its neighbours news that the
  40. neighbours have (probably) not yet seen.
  41. .PP
  42. Flow of netnews between machines
  43. may be achieved by use of any network
  44. which can transmit an arbitrary stream of
  45. (at least 7-bit)
  46. ASCII code, unmodified.
  47. If a network cannot transmit ASCII intact
  48. (e.g. BITNET),
  49. it is possible to encode netnews
  50. before transmission across the network
  51. and
  52. decode it upon reception from the network.
  53. Since one cannot be certain that
  54. one's network neighbours will be up and
  55. reachable at all times,
  56. outgoing netnews must be queued,
  57. at least in the case of network trouble.
  58. To date,
  59. at least
  60. these networks,
  61. protocols and media
  62. have been used to transmit netnews correctly:
  63. UUCP,
  64. RS232,
  65. NNTP,
  66. Ethernet\(rg,
  67. the ARPA Internet,
  68. Datakit\(rg,
  69. ACSnet,
  70. magnetic tape,
  71. SMTP,
  72. and
  73. BITNET,
  74. though at least the last two require some form of encapsulation
  75. to avoid corruption of articles;
  76. SMTP because some common implementations get the newline-CRLF
  77. mappings wrong,
  78. thus throwing off byte counts in batches,
  79. and
  80. BITNET because of its Procrustean chopping,
  81. expanding,
  82. mapping,
  83. bashing
  84. and
  85. smashing
  86. of all data sent through it
  87. (sending lines of 80 or fewer characters of
  88. letters of either case and digits and plus and minus
  89. appears to be safe).
  90. .PP
  91. Netnews arrives via some network,
  92. which causes a command to be executed upon arrival
  93. (e.g.
  94. .I rnews ).
  95. .I rnews
  96. typically spools the inbound netnews for later processing.
  97. Eventually
  98. (often within the hour
  99. or at the end of the business day),
  100. the input queue is run
  101. and the netnews is stored locally,
  102. typically under
  103. .I /usr/spool/news ,
  104. and queued for transmission to netnews neighbours.
  105. Once stored on disk,
  106. netnews may be read by any of a collection of unprivileged news readers,
  107. including
  108. .I cat (1).
  109. .I Expire
  110. is run typically each night
  111. to remove old netnews from disk.
  112. .PP
  113. C News was originally written to provide a
  114. much faster and smaller,
  115. more robust,
  116. reliable
  117. and
  118. correct
  119. implementation of netnews software than B 2.11 news.
  120. We believe that C News is also
  121. faster,
  122. smaller
  123. and
  124. more robust
  125. than B 3.0 news.
  126. B 3.0 news has many more features;
  127. take that as you will.
  128. .SH
  129. C News Components.
  130. .PP
  131. .I Rnews
  132. invokes
  133. the input subsystem,
  134. which
  135. spools incoming netnews in its original form,
  136. as received,
  137. typically in compressed batches.
  138. Periodically,
  139. the input queue should be run
  140. by invoking
  141. .I newsrun ,
  142. thus uncompressing any compressed input
  143. and feeding it to
  144. .I relaynews .
  145. .PP
  146. .I Relaynews
  147. files incoming netnews as articles on disk
  148. and
  149. initiates spooled transmission to other machines,
  150. often by simply writing the names of the disk files
  151. containing the articles on the ends of `batch' files of file names.
  152. Quite a bit of policy from RFC 1036 is embedded in
  153. .I relaynews .
  154. .I inews
  155. is a complex front-end for
  156. .I relaynews
  157. which implements much of the per-site policy on news posting.
  158. .I inews
  159. is a fairly-slow shell script which is adequately fast for most sites,
  160. but it will need to be replaced by something more streamlined
  161. for sites which gateway mailing lists into netnews,
  162. for example.
  163. .PP
  164. The output
  165. .I batcher
  166. reads lists of file names
  167. and
  168. generates news batches
  169. (see RFC 1036 or
  170. .I news (5)
  171. for the format)
  172. of prescribed sizes
  173. and queues the batches
  174. for transmission to other sites.
  175. The batcher is run asynchronously with
  176. .I relaynews ,
  177. typically once an hour
  178. outside of business hours.
  179. .PP
  180. .I Expire
  181. is generally run once per night
  182. to remove from disk news articles older than a few days.
  183. .I Expire
  184. can use different expiry criterion for different newsgroups
  185. and can archive articles instead of removing them.
  186. .I Expire
  187. also runs asynchronously
  188. with
  189. .I relaynews .
  190. .PP
  191. There are many news readers.
  192. C News
  193. comes with a limited news reader
  194. (\c
  195. .I readnews
  196. by Michael Rourke)
  197. sufficient to replace
  198. long-winded
  199. .I /etc/motd s
  200. but you will want a heavy-duty news reader
  201. if you plan to read more than local news groups.
  202. We recommend
  203. .I rn
  204. by Larry Wall,
  205. available from
  206. your netnews neighbours
  207. or
  208. your nearby
  209. .B comp.sources.unix
  210. archive site.
  211. There are others:
  212. .I vn
  213. and
  214. .I vnews
  215. are two.
  216. .SH
  217. Preparation for Installation
  218. .PP
  219. Netnews consumes a lot of disk space
  220. and
  221. often a lot of transmission time.
  222. Here are some relevant measurements regarding a full netnews feed
  223. as of the time of writing
  224. (January 1989),
  225. taken from
  226. .I news.lists :
  227. a day's netnews is about 3Mb and 1,400 articles
  228. in 450 newsgroups.
  229. Years ago,
  230. sites often kept 14 days of netnews on disk,
  231. but now many sites keep news for 3 to 5 days,
  232. thus allowing for the occasional long weekend.
  233. Thus a full news feed expired after 4 days will consume
  234. about 12Mb.
  235. Some people feel that news volume is doubling roughly every 16 months.
  236. If this is true,
  237. we can expect volume to increase by a factor of 10
  238. in about 4 years
  239. to 30Mb per day or 115Mb for 4 days.
  240. It is thus wise planning to set aside a lot of disk space for netnews.
  241. There are two ways to cope with ever-increasing volumes of netnews:
  242. refuse to accept more newsgroups,
  243. or
  244. expire news after shorter intervals on disk.
  245. A current full feed takes just over 7 hours to transmit at 1200 baud,
  246. so for dial-up connections
  247. one clearly wants the fastest modems one can afford.
  248. .PP
  249. Clearly,
  250. transmitting a full news feed is a non-trivial commitment of resources,
  251. so you may have some difficulty in finding a site willing to supply one.
  252. Such a site may in turn expect you to feed yet other sites.
  253. You will need to agree with your prospective netnews neighbour(s)
  254. upon transfer media,
  255. protocols
  256. and
  257. networks.
  258. .PP
  259. Before proceeding to install C News, you should read this document through
  260. to the end, probably read the companion document
  261. \fIThe Interface Between C News And The Outside World\fR,
  262. and possibly read selected items in the
  263. \fIC News Implementor's Notebook\fR and the manual pages.
  264. .PP
  265. You will need to
  266. assign a user id and group id to netnews
  267. (often new ids called ``news'');
  268. initialise these directories:
  269. NEWSCTL
  270. (typically
  271. .B /usr/lib/news ),
  272. NEWSBIN
  273. (\c
  274. .B /usr/lib/newsbin ),
  275. and
  276. NEWSARTS
  277. (\c
  278. .B /usr/spool/news );
  279. and
  280. install each subsystem.
  281. NEWSCTL and NEWSARTS
  282. are logically one subtree,
  283. defining a news data base,
  284. but are split for backward compatibility with
  285. older news software,
  286. particularly old news readers.
  287. NEWSBIN
  288. contains programs and shell scripts
  289. which might be common amongst machines sharing
  290. a common architecture
  291. (e.g. Sun 3's);
  292. .Fn NEWSCTL /bin
  293. may override these.
  294. The goal is to install the subsystems,
  295. integrate them into a working news system,
  296. and
  297. configure the news system to communicate with other news systems.
  298. .PP
  299. There are a few key files that must exist before any serious
  300. attempt may be made to operate the news software.
  301. .Fn NEWSCTL /active
  302. is the list of newsgroups that this site knows
  303. (is willing to accept or individually reject),
  304. and must be owned by the
  305. NEWS
  306. userid
  307. (the userid that owns
  308. .Fn NEWSBIN /relay/relaynews ,
  309. typically
  310. .I news ).
  311. You will probably want to get your initial
  312. .Fn "" active
  313. file from your upstream feed
  314. and edit it to suit the set of groups you wish to receive.
  315. Be sure to make the second field more than five digits wide,
  316. by adding leading zeroes
  317. (ten digits is a conservative width).
  318. .Fn NEWSCTL /sys
  319. defines the newsgroups that this site is willing to accept
  320. and describes how they are to be forwarded to its neighbours.
  321. .Fn NEWSCTL /server
  322. contains the hostname of your file server,
  323. if you have multiple machines sharing news
  324. via a network file system.
  325. .Fn NEWSCTL /whoami
  326. similarly contains the name by which a cluster of machines
  327. sharing news is to be known for purposes of news.
  328. .Fn NEWSCTL /mailname
  329. is optional and contains the full
  330. (possibly dotted)
  331. name by which your cluster is known for purposes
  332. of mail.
  333. .Fn NEWSCTL /organisation
  334. (or
  335. .Fn NEWSCTL /organization
  336. if you insist)
  337. contains the name of your organisation,
  338. which will be copied into the
  339. .B Organization:
  340. header of articles posted locally,
  341. by default.
  342. .Fn NEWSCTL /mailpaths
  343. defines mail routes to machines which contain aliases
  344. for postings to moderated newsgroups.
  345. .Fn NEWSCTL /log ,
  346. .Fn NEWSCTL /errlog ,
  347. .Fn NEWSCTL /history ,
  348. .Fn NEWSCTL /history.dir ,
  349. and
  350. .Fn NEWSCTL /history.pag
  351. must exist and be owned by the
  352. NEWS
  353. userid.
  354. Tentative versions of all these files are built by the installation
  355. procedures, but it is quite likely that you'll have to edit some of them.
  356. .SH
  357. C News Installation
  358. .PP
  359. Proceed to the
  360. .Fn \& conf
  361. directory of the distribution.
  362. There is a major shell file here, named
  363. .Fn \& build ,
  364. that will interrogate
  365. you at length and construct shell files to do the real work.
  366. You may need to do
  367. ``chmod\ +x\ build'' before running it, to make it executable.
  368. .PP
  369. You will probably need your system's manuals on hand to answer
  370. .Fn \& build 's
  371. questions.
  372. Another terminal (or another window, on a bitmap display) would also be
  373. useful.
  374. You'd best be prepared to take notes, also, as
  375. .Fn \& build
  376. will occasionally suggest that something be checked when you're done.
  377. .PP
  378. .Fn \& Build
  379. itself does not alter any files or perform any installation
  380. chores:  all it does is create shell files in the
  381. .Fn \& conf
  382. directory.
  383. If you already know something about news software, or are merely
  384. suspicious that
  385. .Fn \& build
  386. hasn't done everything right, you should
  387. probably read the shell files before running them.
  388. There are four of them:
  389. .Fn \& doit.root ,
  390. .Fn \& doit.bin ,
  391. .Fn \& doit.news ,
  392. and
  393. .Fn \& again.root .
  394. .PP
  395. .Fn \& Doit.root
  396. sets up the major directories for news, and sets their
  397. ownerships correctly.
  398. It typically will have to be run as \fIroot\fR to have adequate permissions
  399. for all of this.
  400. It is brief.
  401. .PP
  402. .Fn \& Doit.bin
  403. does most of the work of building and installing the programs.
  404. It should be run as the user who owns the distribution directories and will
  405. own the executable programs under NEWSBIN.
  406. .PP
  407. .Fn \& Doit.news
  408. does some other small chores and installs control files.
  409. If any of the control files already exist, it will complain and refuse
  410. to overwrite them, as a safety precaution.
  411. It should be run as the owner of the news files.
  412. Since many of the files it is installing are built by
  413. .Fn \& doit.bin ,
  414. that should be run first.
  415. .PP
  416. Finally,
  417. .Fn \& again.root
  418. tends to ownership and permission changes on
  419. a few programs that need to run set-userid.
  420. It requires the ability to change ownerships and to set permissions on
  421. the files afterwards, which usually means running it as \fIroot\fR.
  422. It too is brief.
  423. .PP
  424. There are undoubtedly strange systems out there that
  425. .Fn \& build
  426. and friends are not smart enough to cope with.
  427. In such cases it will be necessary to edit the shell files before running
  428. them, or to use them as guides and do the work by hand.
  429. In particular, systems that require strange options in
  430. .Fn \& Makefile s
  431. will need to have those inserted by hand.
  432. .PP
  433. If you want to test pieces of C News without installing them, some
  434. (not all) of the subsystems have a ``make\ r'' feature that runs a
  435. regression test.
  436. Note:  almost all of these require that
  437. .Fn NEWSCTL /bin/config ,
  438. or its local equivalent, be in place already so that shell files
  439. can find out what PATH (etc.) they should be using.
  440. .PP
  441. Note that it is easy to build a test news system which is completely
  442. independent of other existing news systems on the same machine,
  443. or
  444. to build one which shares its
  445. .Fn NEWSBIN ""
  446. with another C news system,
  447. or shares input of articles
  448. (e.g. running an old B news system
  449. and a new C news system off the same stream of input
  450. until you are confident that your new C news system is operating
  451. to your satisfaction).
  452. See
  453. .I subst (1)
  454. for the mechanism which permits quickly changing
  455. all the places that know the location of
  456. .Fn NEWSCTL /bin/config.
  457. After that,
  458. edit this news system's
  459. .Fn NEWSCTL /bin/config
  460. and things should be set up for separate existence.
  461. .SH
  462. First News
  463. .PP
  464. When you arrange to get a news feed from your neighbor, you should also
  465. ask him to send you the current set of articles in the newsgroup
  466. \fBnews.announce.newusers\fR.
  467. Several of these are very important reading for people who are new to the net.
  468. .SH
  469. Unusual Systems
  470. .PP
  471. We believe that C News runs fine on 16-bit machines, but it hasn't been
  472. tested very thoroughly on them lately.
  473. It will not perform quite as well with the more limited space.
  474. .PP
  475. Machines with very old compilers can be a headache.
  476. There are some hooks in
  477. .Fn \& h/news.h
  478. for doing without ``void'' and ``unsigned long'',
  479. two particular problem areas, but they have to be arranged manually;
  480. .Fn \& build
  481. does not know about them.
  482. .PP
  483. Some very old systems cannot do \fIsetuid(geteuid())\fR, which makes it
  484. impossible for a daemon to make directories and get the ownership right.
  485. We provide a small program,
  486. .Fn \& setnewsids ,
  487. to run setuid-root.
  488. .Fn \& Relaynews
  489. knows about it and invokes it if \fIsetuid(geteuid())\fR fails;
  490. it then sets permissions correctly and re-invokes
  491. .Fn \& relaynews .
  492. The code is short enough to be read and understood in full, so that the
  493. suspicious system administrator can be sure that this setuid-root program
  494. is not going to do something awful.
  495.